home *** CD-ROM | disk | FTP | other *** search
- /************************************************************************************************/
- /* */
- /* Program Name: Stiletto */
- /* */
- /* File Name: LogWindow.h */
- /* */
- /* © Apple Computer, Inc. 1991-1995 */
- /* All Rights Reserved */
- /* */
- /* Revision History: */
- /* */
- /* Date Who Modification */
- /* */
- /* 1991-06-30 Chris Halim Original version */
- /* 1995-06-26 Jaakko Railo Version 2.0 */
- /* */
- /************************************************************************************************/
-
- /****************************************** DESCRIPTION ******************************************
-
- *************************************************************************************************/
-
- /************************************************************************************************/
- /************************************************************************************************/
-
-
- #ifndef __LOGWINDOW__
- #define __LOGWINDOW__
-
-
- #ifndef __FILES__
- #include <Files.h>
- #endif
-
- #ifndef __QUICKDRAW__
- #include <QuickDraw.h>
- #endif
-
- #ifndef __STDARG__
- #include <stdarg.h>
- #endif
-
- #ifndef __WINDOWS__
- #include <Windows.h>
- #endif
-
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct TELiteRec {
- GrafPtr offScreenPort;
- short lineHeight;
- short fontAscent;
- short numOfLines;
- short maxLines;
- short top, left;
- short minWidth;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct TELiteRec TELiteRec;
-
- typedef TELiteRec *TELitePtr, **TELiteHandle;
-
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct LogWindowRec {
- WindowRecord theWindowRecord;
- ControlHandle vScroll, saveCheckBox, clearLogButton;
- TELiteHandle fTELiteHandle;
- FSSpecHandle logFileSpec;
- Boolean saveToDisk;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct LogWindowRec LogWindowRec;
-
- typedef LogWindowRec *LogWindowPtr;
-
-
- enum {
- rLogLWIN = 1000,
- rLogWIND = 1000,
-
- rSaveCheckBoxCNTL = 1000,
- rClearLogButtonCNTL = 1001,
-
- rLogWindowflst = 1000,
- rLogWindowIndSTR = 1000,
- kSaveToDiskInd = 1
- };
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
-
- short CreateLogWindow (LogWindowPtr * logWindow, const Rect * windowRect);
- Boolean IsHandledByLogWindow (LogWindowPtr logWindow, const EventRecord * theEvent);
- pascal void VActionProc (ControlHandle theControl, short part);
- void PutLine (LogWindowPtr logWindow, const char * format, ...);
- void PutCLine (LogWindowPtr logWindow, long color, const char * format, ...);
- void ClearLogWindow (LogWindowPtr logWindow);
-
- void VPutLine (LogWindowPtr logWindow, const char * format, va_list ap);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __LOGWINDOW__ */